package edu.gatech.oad.OTConfig;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.image.BufferedImage;

import javax.swing.SwingConstants;
import javax.swing.JCheckBox;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.RowSpec;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;


public class IntroButtons extends JPanel {
	private JButton trail;
	private JButton load;
	Image newImg;
	BufferedImage image;
	public IntroButtons() {
		setLayout(null);
		
		trail = new JButton("Hit the trail");
		trail.setBackground(new Color(222, 184, 135));
		trail.setBounds(499, 344, 157, 23);
		add(trail);
		
		load = new JButton("Load Game");
		load.setBackground(new Color(222, 184, 135));
		load.setBounds(37, 344, 157, 23);
		add(load);
		repaint();
		
		ImageIcon icon = new ImageIcon("C:\\Users\\Akbar\\Desktop\\oregontrail.gif");
		Image img = icon.getImage();
	 newImg = img.getScaledInstance(700, 400,  java.awt.Image.SCALE_SMOOTH);  
	//	Icon newIcon = new ImageIcon(newimg);  
	}
	
	public JButton getLoad(){
		return load;
	}
	
	public JButton getTrail(){
		return trail;
	}
	
    public void paintComponent(Graphics g)
    {
    	
    	super.paintComponent(g);
    	g.drawImage(newImg, 0, 0, 700, 400, this);
    	
    }
	
	
}
